package com.heima.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Activities implements Serializable {
    private Integer id;                 //主键id
    private String channel;            //渠道来源
    private String code;                //活动编号
    private String name;                //活动名称
    private String info;                //活动简介
    private String type;               //活动类型   1-折扣，2-代金券
    private Double discount;           //折扣
    private Integer vouchers;           //代金券
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime beginTime;    //开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime endTime;      //结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;   //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;   //更新时间
}
